package com.javaweb.dao;

import com.javaweb.model.Article;

import java.util.Date;
import java.util.List;

public interface ArticleDao {
    /**
     * 新增新文章
     *
     * @param article
     * @return
     */
    public int insert(Article article);

    public int updateContent(Integer id, String newContent);

    public int updateTitle(Integer id, String newTitle);

    public int deleteById(Integer id);

    public List<Article> selectByUserId(Integer userId);

    public int selectId(Integer userId, String title, Date createTime);

    public List<Article> selectByKeyword(String keyword);

    List<Article> selectByTimePeriod(Date startTime, Date endTime);


    List<Article> selectByTag(Integer tagId);
    List<Article> selectByCategory(Integer categoryId);

}
